package com.ruoyi.hotel.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hotel.mapper.HlPayoutsMapper;
import com.ruoyi.hotel.domain.HlPayouts;
import com.ruoyi.hotel.service.IHlPayoutsService;

/**
 * 物品赔付Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-12-10
 */
@Service
public class HlPayoutsServiceImpl implements IHlPayoutsService 
{
    @Autowired
    private HlPayoutsMapper hlPayoutsMapper;

    /**
     * 查询物品赔付
     * 
     * @param id 物品赔付主键
     * @return 物品赔付
     */
    @Override
    public HlPayouts selectHlPayoutsById(Long id)
    {
        return hlPayoutsMapper.selectHlPayoutsById(id);
    }

    /**
     * 查询物品赔付列表
     * 
     * @param hlPayouts 物品赔付
     * @return 物品赔付
     */
    @Override
    public List<HlPayouts> selectHlPayoutsList(HlPayouts hlPayouts)
    {
        return hlPayoutsMapper.selectHlPayoutsList(hlPayouts);
    }

    /**
     * 新增物品赔付
     * 
     * @param hlPayouts 物品赔付
     * @return 结果
     */
    @Override
    public int insertHlPayouts(HlPayouts hlPayouts)
    {
        hlPayouts.setCreateTime(DateUtils.getNowDate());
        return hlPayoutsMapper.insertHlPayouts(hlPayouts);
    }

    /**
     * 修改物品赔付
     * 
     * @param hlPayouts 物品赔付
     * @return 结果
     */
    @Override
    public int updateHlPayouts(HlPayouts hlPayouts)
    {
        hlPayouts.setUpdateTime(DateUtils.getNowDate());
        return hlPayoutsMapper.updateHlPayouts(hlPayouts);
    }

    /**
     * 批量删除物品赔付
     * 
     * @param ids 需要删除的物品赔付主键
     * @return 结果
     */
    @Override
    public int deleteHlPayoutsByIds(Long[] ids)
    {
        return hlPayoutsMapper.deleteHlPayoutsByIds(ids);
    }

    /**
     * 删除物品赔付信息
     * 
     * @param id 物品赔付主键
     * @return 结果
     */
    @Override
    public int deleteHlPayoutsById(Long id)
    {
        return hlPayoutsMapper.deleteHlPayoutsById(id);
    }
}
